package com.geline.sqlbackup.bean;

import com.geline.sqlbackup.enums.HtmlTypeEnum;
import com.geline.sqlbackup.enums.SysQueryMethodEnum;

import java.io.Serializable;
import java.util.List;

/**
 * DDL字段信息
 * @author mengx
 * @version 2020/12/2 15:00
 */
public class ColumnInfo implements Serializable {

    private String columnName;
    private String columnTableField;//t.id
    private String columnType;
    private String columnComment;
    private Integer jdbcTypeCode;//jdbc type integer value
    private Integer length;
    private Integer scale;
    private Object defaultValue;
    private boolean notNull;
    private boolean primaryKey;
    private boolean autoIncrement;
    private boolean dateTypeFlag;//是否为日期类型，可用于排序
    private boolean intFlag;//是否为整形
    private boolean numbericFlag;//是否为小数
    private boolean stringFlag;//是否为字符串

    private String readTable;//字段来源表名（当前字段为外键或其它表字段）
    private String dictType;//字典code,用于多选、单选组件
    private List<LabelValue> options;//字典值列表
    private HtmlTypeEnum htmlTypeEnum;//HtmlTypeEnum=[input,number,textarea,date,datetime,checkbox,radio,select,hidden]
    private String javaFieldName;
    private String javaFieldType;//初始化参考：initJavaFieldType(IntrospectedColumn introspectedColumn)
    private SysQueryMethodEnum sysQueryMethodEnum;//where之后对应的过滤条件

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public String getColumnTableField() {
        return columnTableField;
    }

    public void setColumnTableField(String columnTableField) {
        this.columnTableField = columnTableField;
    }

    public String getColumnType() {
        return columnType;
    }

    public void setColumnType(String columnType) {
        this.columnType = columnType;
    }

    public String getColumnComment() {
        return columnComment;
    }

    public void setColumnComment(String columnComment) {
        this.columnComment = columnComment;
    }

    public Integer getJdbcTypeCode() {
        return jdbcTypeCode;
    }

    public void setJdbcTypeCode(Integer jdbcTypeCode) {
        this.jdbcTypeCode = jdbcTypeCode;
    }

    public Integer getLength() {
        return length;
    }

    public void setLength(Integer length) {
        this.length = length;
    }

    public Integer getScale() {
        return scale;
    }

    public void setScale(Integer scale) {
        this.scale = scale;
    }

    public Object getDefaultValue() {
        return defaultValue;
    }

    public void setDefaultValue(Object defaultValue) {
        this.defaultValue = defaultValue;
    }

    public boolean isNotNull() {
        return notNull;
    }

    public void setNotNull(boolean notNull) {
        this.notNull = notNull;
    }

    public boolean isPrimaryKey() {
        return primaryKey;
    }

    public void setPrimaryKey(boolean primaryKey) {
        this.primaryKey = primaryKey;
    }

    public boolean isAutoIncrement() {
        return autoIncrement;
    }

    public void setAutoIncrement(boolean autoIncrement) {
        this.autoIncrement = autoIncrement;
    }

    public boolean isDateTypeFlag() {
        return dateTypeFlag;
    }

    public void setDateTypeFlag(boolean dateTypeFlag) {
        this.dateTypeFlag = dateTypeFlag;
    }

    public boolean isIntFlag() {
        return intFlag;
    }

    public void setIntFlag(boolean intFlag) {
        this.intFlag = intFlag;
    }

    public boolean isNumbericFlag() {
        return numbericFlag;
    }

    public void setNumbericFlag(boolean numbericFlag) {
        this.numbericFlag = numbericFlag;
    }

    public boolean isStringFlag() {
        return stringFlag;
    }

    public void setStringFlag(boolean stringFlag) {
        this.stringFlag = stringFlag;
    }

    public String getReadTable() {
        return readTable;
    }

    public void setReadTable(String readTable) {
        this.readTable = readTable;
    }

    public String getDictType() {
        return dictType;
    }

    public void setDictType(String dictType) {
        this.dictType = dictType;
    }

    public List<LabelValue> getOptions() {
        return options;
    }

    public void setOptions(List<LabelValue> options) {
        this.options = options;
    }

    public HtmlTypeEnum getHtmlTypeEnum() {
        return htmlTypeEnum;
    }

    public void setHtmlTypeEnum(HtmlTypeEnum htmlTypeEnum) {
        this.htmlTypeEnum = htmlTypeEnum;
    }

    public String getJavaFieldName() {
        return javaFieldName;
    }

    public void setJavaFieldName(String javaFieldName) {
        this.javaFieldName = javaFieldName;
    }

    public String getJavaFieldType() {
        return javaFieldType;
    }

    public void setJavaFieldType(String javaFieldType) {
        this.javaFieldType = javaFieldType;
    }

    public SysQueryMethodEnum getSysQueryMethodEnum() {
        return sysQueryMethodEnum;
    }

    public void setSysQueryMethodEnum(SysQueryMethodEnum sysQueryMethodEnum) {
        this.sysQueryMethodEnum = sysQueryMethodEnum;
    }
}
